import request from '/@/utils/request';
import { BaseRequest, BaseResponse } from '/@/interfaces/BaseModel';
import { TaskExecuteInfoApi } from '/@/enums/dpp-api-enum';
import {
    TaskExecuteInfoSearchParamModel,
    TaskExecuteInfoListModel,
} from '/@/interfaces/DataPipelineModel';

function useTaskExecuteInfo() {
    return {
        list: function (payload: BaseRequest<TaskExecuteInfoSearchParamModel>) {
            return request.post<BaseResponse<TaskExecuteInfoListModel[]>>(TaskExecuteInfoApi.LIST, payload);
        },
    };
}

export default useTaskExecuteInfo;